cmake_minimum_required(VERSION 3.15)

if (NOT LIB3RD_PATH)
	message(FATAL_ERROR "3rd not specified")
endif()

list(APPEND CMAKE_MODULE_PATH "${LIB3RD_PATH}/share")

project(PoissonImageEditing)

add_executable(pie main.cpp)

find_package(OpenCV REQUIRED core photo imgcodecs imgproc)
if (OPENCV_CORE_FOUND)
	target_include_directories(pie PRIVATE ${OpenCV_INCLUDE_DIRS})
	target_link_libraries(pie PRIVATE ${OpenCV_LIBS})
else()
	message(FATAL_ERROR "OpenCV not found")
endif()

find_package(Eigen3)
if (EIGEN3_FOUND)
	target_include_directories(pie PUBLIC ${EIGEN3_INCLUDE_DIRS})
else()
	message(FATAL_ERROR "Eigen3 not found")
endif()

